package Collecting;

/**
 * @Author czl
 * @Date 2024-03-20
 */
public class Collecting extends Thread{
    @Override
    public void run() {
        while (true){

            boolean interrupted = Thread.currentThread().isInterrupted();

            if (interrupted){
                break;
            }

            try {
                Thread.sleep(2000);
            } catch (InterruptedException e) {

                Thread.currentThread().interrupt();
            }

            System.out.println("采集数据......");
        }
    }
}
